home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.jan.archive / 000069_crash!rossegat.uji.es!itigso78_Thu, 27 Jan 94 00:51:47 PST.msg < prev    next >
Text File  |  1994-02-17  |  4KB  |  103 lines

  1. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  2.       id <1nzp@bkhouse.cts.com>; Thu, 27 Jan 94 00:51:47 PST
  3. Received: from pereiii.uji.es by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0pPBco-00002JC; Wed, 26 Jan 94 06:53 PST
  5. Received: from rossegat.uji.es by pereiii.uji.es with SMTP
  6.     (1.37.109.4/16.2) id AA06836; Wed, 26 Jan 94 15:17:22 +0100
  7. Received: by rossegat.uji.es
  8.     (1.37.109.4/16.2) id AA22867; Wed, 26 Jan 94 15:11:31 +0100
  9. Message-Id: <m0pPBco-00002JC@crash.cts.com>
  10. Date: Wed, 26 Jan 94 15:11:31 MET
  11. Reply-To: <itigso78@rossegat.uji.es>
  12. Mailer: Elm [revision: 70.85]
  13. From: itigso78@rossegat.uji.es
  14. To: amigae@bkhouse.cts.com
  15. Subject: Get info
  16.  
  17. INDEX
  18. HELP AmigaE
  19. FAQ AmigaE
  20. From crash!archimed.irit.fr!vintenat Thu, 27 Jan 94 00:51:55 PST
  21. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  22.       id <1nzu@bkhouse.cts.com>; Thu, 27 Jan 94 00:51:55 PST
  23. Received: from archimed.irit.fr by crash.cts.com with smtp
  24.     (Smail3.1.28.1 #18) id m0pPBd7-0000MSC; Wed, 26 Jan 94 06:54 PST
  25. Received: from localhost (vintenat@localhost) by archimed.irit.fr (8.6.4/8.6.4) id PAA13407; Wed, 26 Jan 1994 15:57:13 GMT
  26. Date: Wed, 26 Jan 1994 15:57:13 GMT
  27. Message-Id: <199401261557.PAA13407@archimed.irit.fr>
  28. From: Lionel VINTENAT <vintenat@archimed.irit.fr>
  29. To: AmigaE@bkhouse.cts.com
  30. Cc: AMONROE@rcbins.mu.wvnet.edu
  31. Subject: Re: circles
  32.  
  33. >I got "AreaExamples" from aminet which would be perfect except that
  34. >it's in C and I don't know C.  I can follow what they are doing but I
  35. >don't know what the "*" thing does in C so I don't know how to make
  36. >my variables.
  37.  
  38.     Here are some equivalences C<=>E which may help you...
  39.  
  40.     Inside declarations :
  41. char *var1    <=>    DEF var1:PTR TO CHAR
  42. object1_type_name *var2    <=>    DEF var2:PTR TO object1_type_name
  43.  
  44.     Inside "classic" section code :
  45. (*var1)='a'    <=>    ^var1:="a" or PutChar(var1,"a")
  46. var2->field_name_of_object1=3    <=>    var2.field_name_of_object1:=3
  47.  
  48.     Lionel
  49. From crash!UNCA.EDU!JVANRIPER Thu, 27 Jan 94 00:52:23 PST
  50. Received: by bkhouse.cts.com (V1.17-beta/Amiga)
  51.       id <1o0h@bkhouse.cts.com>; Thu, 27 Jan 94 00:52:23 PST
  52. Received: from uncavx by crash.cts.com with smtp
  53.     (Smail3.1.28.1 #18) id m0pPCST-0000WxC; Wed, 26 Jan 94 07:47 PST
  54. Received: from UNCA.EDU by UNCA.EDU (PMDF V4.2-15 #5911) id
  55.  <01H84VN60V9Y90O3FY@UNCA.EDU>; Wed, 26 Jan 1994 10:42:22 EST
  56. Date: Wed, 26 Jan 1994 10:42:22 -0500 (EST)
  57. Message-id: <01H84VN60VA090O3FY@UNCA.EDU>
  58. Organization: University of North Carolina at Asheville
  59. X-VMS-To: IN%"AmigaE@bkhouse.cts.com"
  60. MIME-version: 1.0
  61. Content-type: TEXT/PLAIN; CHARSET=US-ASCII
  62. Content-transfer-encoding: 7BIT
  63. From: "Joseph E. Van_Riper III" <JVANRIPER@UNCA.EDU>
  64. To: AmigaE@bkhouse.cts.com
  65. Subject: Re: circles
  66.  
  67. You wrote:
  68.  
  69. | I can follow what they are doing but I don't know what the "*" thing does in
  70. | C so I don't know how to make my variables.
  71.  
  72. The '*' symbol means a few things, depending on how it's being used.
  73.  
  74. If you see something like 'char *c' then it is specifying 'c' as a variable
  75. that is a pointer (sorta like E's {c}, but not quite).  If you later in the
  76. same program see "*c = 'M'" it refers to the value in the area of memory
  77. pointed to by 'c'.
  78.  
  79. However, if it was 'char c', and later you see 'mystery-variable = *c' then the
  80. '*' refers to the address of the variable 'c' (that is, it's EXACTLY like E's
  81. use of {}).
  82.  
  83. SO...The following 'chart' might help when effecting these conversions:
  84.  
  85. C                                     E
  86. ================================================================================
  87. char c;                               DEF c
  88.   c = 'M';                              c := "M"
  89.   mystery_variable = *c;                mystery_variable := {c}
  90.  
  91. char *c;                              DEF c
  92.   c = "Eat more quiche.";               c := 'Eat more quiche.'
  93.   mystery_variable = *c;                mystery_variable := Char(c)
  94.                                          /* NOTE: this is not advised
  95.                                             in strict 'E' coding.. I'm
  96.                                             simply emphasising something. */
  97.  
  98. It gets weirder when you start messing around with OBJECTS/structs, but
  99. hopefully this will be enough to get the basic principals down (and, hopefully,
  100. I didn't screw up somehow).
  101.  
  102. - Trey
  103.